import asyncio
import websockets
async def hello(i):
    async with websockets.connect("ws://10.10.158.98:8765") as websocket:
        await websocket.send(f"Hello world!{i}")
        response = await websocket.recv()
        print(response)


for i in range(10):
    asyncio.get_event_loop().run_until_complete(hello(str(i)))